<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AutofocusTest.aspx.cs" Inherits="TestAutofocus" %>
<!--
/*
 *  Copyright (c) 2008 Howard Shank
 * Permission is hereby granted, free of charge, to any person obtaining a copy of 
 * this software and associated documentation files (the "Software"), to deal in 
 * the Software without restriction, including without limitation the rights to use, 
 * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the 
 * Software, and to permit persons to whom the Software is furnished to do so, subject 
 * to the following conditions:

 * The above copyright notice and this permission notice shall be included in all copies or 
 * substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Ajax Controls and Extenders - Autofocus Test Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
            <strong><span style="font-size: 32pt">Autofocus Test</span></strong><br />

        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <a href="Default.aspx">Goto main page</a><br />
        <br /> The autofocus extender allows a control to automatically receive focus when the
        user moves the mouse over the control.<br />
        Properties:<br />
        RestoreOnMouseout(bool):<br />
        <em>If set to true, the boolean property RestoreOnMouseout allows the control to set
            the active element focus back to the previous active
        element. If false, the control
            maintains focus.<br />
        </em>
        <br />
        This textbox control does not have auto focus enabled. It will not respond to mouseover
        event.<br />
        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br />
        <br />
        This textbox control does have auto focus enabled and restore on mouseout is set
        to FALSE:<br />
        It will respond to mouseover event. It will not change focus on the mouseout event.<br />
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        *Autofocus, maintain focus on mouseout<br />
        <ajaxTools:AutoFocusExtender ID="AutoFocusExtender2" runat="server" TargetControlID="TextBox1">
        </ajaxTools:AutoFocusExtender>
        <br />
        This button control does not have auto focus enabled.<br />
        It will not respond to the mouseover or mouseout event.<br />
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Just a button" /><br />
        <br />
        This is just a textbox.
        <br />
        It will not respond to mouseover or mouseout event.<br />
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
        <br />
        This button has auto focus enabled and Restore on mouseout is set to TRUE: &nbsp;<br />
        It will gain focus on mouseover ad it will restore focus to whatever control was
        <br />
        active before the mouseover when the mouse event mouseout is triggered.<br />
        <asp:Button ID="Button2" runat="server" Text="Autofocus button" />
        *Autofocus, restore focus on mouseout<br />
        <ajaxTools:AutoFocusExtender ID="AutoFocusExtender1" runat="server" RestoreOnMouseout="True" TargetControlID="Button2">
        </ajaxTools:AutoFocusExtender>
        <br />
        <a href="Default.aspx">Goto main page</a><br /> <br />
    
    </div>
    </form>
</body>
</html>
